home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Miscellany / Swap.h < prev   
Encoding:
Text File  |  1997-06-28  |  165 b   |  15 lines  |  [TEXT/CWIE]

  1. // Swap.h
  2.  
  3. #ifndef Swap_h
  4. #define Swap_h
  5.  
  6. template <class Type>
  7. void Swap( Type& left, Type& right )
  8.   {
  9.     Type out( left );
  10.     left = right;
  11.     right = out;
  12.   }
  13.  
  14. #endif
  15.